package com.xiashitech.agent.instrumentation.utils;

import io.opentelemetry.javaagent.bootstrap.internal.InstrumentationConfig;

public class SuppressUtil {
    public static boolean isSuppress(String className) {
        if(className == null) {
            return false;
        }
        String suppressNames = InstrumentationConfig.get().getString("xs.suppress.runnable.classname");
        if(suppressNames != null) {
            for (String suppressName : suppressNames.split(",")) {
                if(className.contains(suppressName)) {
                    return true;
                }
            }
        }
        return false;
    }
}
